class GroupModel {
  num? code;
  List<GroupItemModel>? data;
  String? message;

  GroupModel({
    this.code,
    this.data,
    this.message,
  });

  GroupModel.fromJson(Map<String, dynamic> json) {
    code = json['code'] as num?;
    if (json['data'] != null) {
      data = <GroupItemModel>[];
      json['data'].forEach((v) {
        data?.add(GroupItemModel.fromJson(v));
      });
    }
    message = json['message'];
  }

  Map<String, dynamic> toJson() {
    final data = <String, dynamic>{};
    data['code'] = code;
    if (this.data != null) {
      data['data'] = this.data?.map((v) => v.toJson()).toList();
    }
    data['message'] = message;
    return data;
  }
}

class GroupItemModel {
  int? id;
  String? groupName;
  String? groupDesc;

  GroupItemModel({
    this.id,
    this.groupName,
    this.groupDesc,
  });

  GroupItemModel.fromJson(Map<String, dynamic> json) {
    id = json['id'] as int?;
    groupName = json['group_name'];
    groupDesc = json['group_desc'];
  }

  Map<String, dynamic> toJson() {
    final data = <String, dynamic>{};
    data['id'] = id;
    data['group_name'] = groupName;
    data['group_desc'] = groupDesc;
    return data;
  }
}
